package com.qiche.controller.wx;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.qiche.aspect.Result;
import com.qiche.model.Merchant;
import com.qiche.model.StoreMember;
import com.qiche.service.MerchantService;

/**
 * @author LB
 *
 * @date 2018年7月17日
 */
@RestController
@RequestMapping("wx/merchant")
public class MerchantWxController {

	@Autowired
	private MerchantService merchantService;
	
	@PostMapping("/agentIdMerchant")
	public Result<?> agentIdMerchant(@RequestParam String accessToken, @RequestParam String openid, String unionid,
			@RequestParam Long merchantId, StoreMember storeMember, @RequestParam String agentId) {
		List<Merchant> Merchant = merchantService.selectByAgentId(agentId);
		return Result.createBySuccess(Merchant);
	}
	
}
